How to register IQ_mail | How to Send mail form IQ_mail
Want a successful Modern site?
Start with IQRA training; it’s easy and quick to your needs.
Normally used Mail Folder Structure
Mail (directory)
- templates (use mail templates from this directory)
- mailer.php (include this file with function.php)
Note
- Create Function for Every Seprate Mail. (example: IQ_login_mail );
1. IQ_mail($email, $subject, $template)
function IQ_lottories_mail_order($email,$data){
$subject = 'Thanks for Purchase Ticket. Your Ticket is in Process';
$variables = array();
$variables['site_url'] = site_url('');
$variables['logo'] = site_options('return_logo');
$variables['order_link'] = site_url('', 'my-account?tab=orders');
$variables['title'] = site_options('return_title');
// $data
$variables['order_id'] = $data['order_id'];
$variables['order_status'] = $data['order_status'];
$variables['order_price'] = $data['order_price'];
$template = file_get_contents(IQ_lotto_lottery_dir.'mail/templates/order.html');
foreach($variables as $key => $value){
$template = str_replace('{{ '.$key.' }}', $value, $template);
}
$mail_execute = IQ_mail($email,$subject,$template);
}